import { post } from '@/request/http'
import { toString } from '@/utils/utils'
import store from '@/store'

//查询国家
export const GetCouModelList=({
  ctyCd,//国家代码
  ctyCname,//中文名
  ctyEname, //英文名
  PageIndexs,
  PageSizes
})=>{
  return post('/FTKJWLHYPT/base/GetCouModelList',{

    Data: {
      Parameters: {
        FTKJWLHYPT: {
          ctyCd,
          ctyCname,
          ctyEname
        }
      },
      PageIndex: {
        FTKJWLHYPT: PageIndexs
      },
      PageSize: {
        FTKJWLHYPT: PageSizes
      }

    }

  })
}

//新增国家
export const AddCountries=({
  ctyCd,
  ctyIsvalid,
  ctyRemark,
  ctyEname,
  ctyCname
})=>{
  return post ('/FTKJWLHYPT/base/AddCountries',{

    Data: {
      Parameters: {
        FTKJWLHYPT: {
          ctyCd,
          ctyIsvalid,
          ctyEname,
          ctyCname,
          ctyRemark,
          ctyInsertuser:store.state.user.USR_CODE_DX_H
        }
      }
    }
  })
}

////编辑国家
export const EditCountries=({
  ctyCd,
  ctyIsvalid,
  ctyRemark,
  ctyEname,
  ctyCname
})=>{
  return post('/FTKJWLHYPT/base/EditCountries',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          ctyCd,
          ctyIsvalid,
          ctyLstupduser:store.state.user.USR_CODE_DX_H,
          ctyEname,
          ctyCname,
          ctyRemark
        }
      }
    }
  })
}

//删除国家
export const DeleteCountries=(ctyCd)=>{
  return post('/FTKJWLHYPT/base/DeleteCountries',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          ctyCd
        }
      }
    }
  })
}
